package Game.Players.Units;

/**
 * Created by sech_92 on 16.12.2014.
 */
public class HeavyInfantry extends Unit {
    private int armor = 0;
    private int regeneration = 0;
    Weapons[] weapon = {null, null};

    private HeavyInfantry(String _name, int _health, int _armor, int _regen, THeavyInfantry type) {
        name = _name;
        health = _health;
        armor = _armor;
        regeneration = _regen;
        level = 2;
        squadSize = 1;
        Weapons.makeWeaponz(type, weapon);
    }

    public static HeavyInfantry make(THeavyInfantry type) {
        HeavyInfantry constr;
        switch (type) {
            case Space_Marine:
                constr = new HeavyInfantry("Space marine", 350, 10, 2, type);
                break;
            case Assault_Marine:_Marine:
                constr = new HeavyInfantry("Assault marine", 350, 10, 2, type);
                break;
            case Kasrkin:
                constr = new HeavyInfantry("Kasrkin", 350, 10, 2, type);
                break;
            case Ogryn:
                constr = new HeavyInfantry("Ogryn", 350, 10, 2, type);
                break;
            case Immortal:
                constr = new HeavyInfantry("Immortal", 350, 10, 2, type);
                break;
            case Flayed_one:
                constr = new HeavyInfantry("Flayed one", 350, 10, 2, type);
                break;
            case Necron_Warrior:
                constr = new HeavyInfantry("Necron warrior", 350, 10, 2, type);
                break;
            case Nob:
                constr = new HeavyInfantry("Nob", 350, 10, 2, type);
                break;
            case Storm_boy:
                constr = new HeavyInfantry("Storm boy", 350, 10, 2, type);
                break;
            case Tank_busta:
                constr = new HeavyInfantry("Tank busta", 350, 10, 2, type);
                break;
            case Banshee:
                constr = new HeavyInfantry("Banshee", 350, 10, 2, type);
                break;
            case Ripper:
                constr = new HeavyInfantry("Ripper", 350, 10, 2, type);
                break;
            case Chaos_Marine:
                constr = new HeavyInfantry("Chaos marine", 350, 10, 2, type);
                break;
            case Chaos_Raptor:
                constr = new HeavyInfantry("Chaos raptor", 350, 10, 2, type);
                break;
            case Khorn_Berserker:
                constr = new HeavyInfantry("Khorn Berserker", 350, 10, 2, type);
                break;
            case Warp_Spider:
                constr = new HeavyInfantry("Warp Spider", 350, 10, 2, type);
                break;
            case Fire_Warrior:
                constr = new HeavyInfantry("Fire warrior", 350, 10, 2, type);
                break;
            case Kroot:
                constr = new HeavyInfantry("Kroot", 350, 10, 2, type);
                break;
            case Kroot_hound:
                constr = new HeavyInfantry("Kroot hound", 350, 10, 2, type);
                break;
            case Flash_Gitz:
                constr = new HeavyInfantry("Flash Gitz", 350, 10, 2, type);
                break;

            default:
                constr = new HeavyInfantry("", 0, 0, 0, type);
                break;
        }
        return constr;
    }

    public int getRegeneration (){
        return regeneration;
    }

    public int getArmor(){
        return armor;
    }

    public void decreaseArmor(int a){
        armor -= (a < 0 ? 0 : a);
    }
}
